#include "BeanieCore.h"

void BeanieCore::createTexture(BeanieTexture* a_texture, char* a_filePath)
{
	if(m_exit) return;
	m_graphics.createTexture(a_texture,a_filePath);
}

void BeanieCore::updateCamera(V2DF a_camPos)
{
	if(!m_window.hMsg()) m_exit = true;
	if(m_exit) return;

	m_graphics.updateCamera(a_camPos);
}

void BeanieCore::updateTransform(BeanieTexture* a_texture,
	V2DF a_transform, V2DF a_scale, float a_rotate,
	V2DF* a_pos, V2DF* a_min, V2DF* a_max)
{
	if(m_exit) return;
	m_graphics.updateTransform(
		a_texture,a_transform,a_scale,a_rotate,
		a_pos,a_min,a_max);
}

void BeanieCore::drawBegin()
{
	if(m_exit) return;
	m_graphics.drawBegin();
}

void BeanieCore::drawEnd()
{
	if(m_exit) return;
	m_graphics.drawEnd();
}

void BeanieCore::drawLine(V2DF a_start, V2DF a_end, int a_color)
{
	if(m_exit) return;
	m_graphics.drawLine(a_start,a_end,a_color);
}

void BeanieCore::drawText(char* a_text, V2DF a_pos, int a_color)
{
	if(m_exit) return;
	m_graphics.drawText(a_text,a_pos,a_color);
}

void BeanieCore::drawTexture(BeanieTexture* a_texture)
{
	if(m_exit) return;
	m_graphics.drawTexture(a_texture);
}